PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man

install:
	@echo Installing the executable to $(DESTDIR)$(BINDIR)
	@mkdir -p    $(DESTDIR)$(BINDIR)
	@cp -f atm   $(DESTDIR)$(BINDIR)/atm
	@chmod 755   $(DESTDIR)$(BINDIR)/atm
	@echo Installing the manual page to $(DESTDIR)$(MANDIR)/man1
	@mkdir -p    $(DESTDIR)$(MANDIR)
	@cp -f atm.1 $(DESTDIR)$(MANDIR)/man1/atm.1
	@chmod 644   $(DESTDIR)$(MANDIR)/man1/atm.1

uninstall:
	@echo Removing the executable from $(DESTDIR)$(BINDIR)
	@rm -f $(DESTDIR)$(BINDIR)/atm
	@echo Removing the manual page from $(DESTDIR)$(MANDIR)/man1
	@rm -f $(DESTDIR)$(BINDIR)/man1/atm.1

.PHONY: install uninstall
